
Ext.onReady(function() { 
  var icon=g_rootPath+"extjs/resources/images/default/window/icon-info.gif";
  var viewport=new Ext.Viewport({
     layout:'border',
     hideBorders:true,
     items:[
       {
//         title:'north',
         region:'north',
         contentEl:'north-div',
         split:true,
         border:true,
         collapsible:true,
         height:113,
         minSize:0,
         maxSize:150
       },
       	{
//         title:'south',
         region:'south',
         contentEl:'south-div'
       },{
//         title:'center',
         region:'center',
         contentEl:'center-div',
         autoHeight:true
       }
     ]
   
  });
  
	Ext.Ajax.request({
	   method:'POST',
	   url: g_rootPath+'common/menu.jsp',
	   success: function(response){
          var tb=new Ext.Toolbar({style:'background: transparent;top:70px;border:0'});
          tb.render('menubar');
   	      var rootDiv=Ext.get('menuList');
   	      rootDiv.dom.innerHTML=response.responseText;
	      var rootMenu=Ext.get('primary-nav');
		  Ext.quick.genMenu(tb,rootMenu,icon);
		  rootDiv.dom.innerHTML="";
	   },
	   failure: function(){
		  Ext.Msg.alert(jspVarHandler.fmt_label_error,jspVarHandler.fmt_info_load_error);
	   }
	})  
});

